home *** CD-ROM | disk | FTP | other *** search
/ Libris Britannia 4 / science library(b).zip / science library(b) / HAMRADIO / LOGBOOK.ZIP / LOGUPDAT.PRG < prev    next >
Text File  |  1986-06-09  |  4KB  |  133 lines

  1. *LOGUPDATE VERSION 860422 COPYRIGHT (c) JOE KASSER G3ZCZ 1985,1986
  2. *UTILITY TO ENTER CONTEST LOG DATA INTO DATABASE BY HAND
  3. ERASE
  4. @ 12,28 SAY 'WARNING'
  5. @ 14,14 SAY 'THIS MODULE DOES NOT INVOKE THE INDEX '
  6. @ 16,2 SAY ' USE OF THIS MODULE ON A REGULAR LOG FILE WILL FOUL ITS INDEX'
  7. @ 18,1 SAY 'BE SURE YOU ARE ONLY WORKING WITH A PREVIOUSLY CREATED CONTEST LOG'
  8. @ 20,1 SAY ' '
  9. WAIT
  10. USE &logbook
  11.  
  12. STORE T TO callflag
  13.  
  14. GOTO BOTTOM
  15. STORE call TO lastcall
  16.  
  17. *INITIALISE NEW VARIABLES
  18. STORE date TO ndate
  19. STORE time TO ntime
  20. STORE band TO nband
  21. STORE power TO npower
  22. STORE mode TO nmode
  23. STORE rx TO nrx
  24. STORE tx TO ntx
  25.  
  26.  
  27. *MAIN LOOP
  28. DO WHILE callflag
  29.    ERASE
  30.    STORE "-" TO nqslsent 
  31.    STORE "-" TO nqslrx
  32.    STORE "          " TO ncall
  33.    STORE "          " TO ncomments
  34.    STORE " " TO logflag
  35.    STORE T TO dataflag
  36.    @ 4,1 SAY 'NOTE, leave space between number and data in comments if'
  37.    @ 5,1 SAY 'MODE = SSB (eg 59 100)'
  38.    DO WHILE dataflag
  39.       @ 10,1  SAY "LAST CONTACT WAS"
  40.       @ 10,20 SAY lastcall
  41.       @ 12,1  SAY "DATE"
  42.       @ 13,1  SAY "TIME"
  43.       @ 14,1  SAY "CALL"
  44.       @ 15,1  SAY "BAND"
  45.       @ 16,1  SAY "POWER"
  46.       @ 17,1  SAY "MODE"
  47.       @ 18,1  SAY "REPORT (RX)"
  48.       @ 19,1  SAY "REPORT (TX)"
  49.       @ 20,1  SAY "COMMENTS"
  50.       @ 23,1  SAY "Logit (*BL)"
  51.  
  52.       @ 12,13 SAY ndate
  53.       @ 15,13 SAY nband
  54.       @ 16,13 SAY npower
  55.       @ 17,13 SAY nmode
  56.       @ 18,13 SAY nrx
  57.       @ 19,13 SAY ntx
  58.  
  59.       @ 13,13 GET ntime
  60.       @ 14,13 GET ncall
  61.       @ 20,13 GET ncomments
  62.       @ 23,13 GET logflag
  63.       READ
  64.  
  65.       DO CASE
  66.  
  67.          CASE logflag = "*"
  68.             STORE F TO callflag
  69.             STORE F TO dataflag
  70.  
  71.  
  72.          CASE logflag = "L"
  73.             *LOG ENTRY
  74.             APPEND BLANK
  75.             STORE   F          TO   dataflag
  76.             REPLACE qslsent    WITH nqslsent
  77.             REPLACE qslrx      WITH nqslrx
  78.             REPLACE date       WITH ndate
  79.             REPLACE time       WITH ntime
  80.             REPLACE call       WITH ncall
  81.             REPLACE band       WITH nband
  82.             REPLACE power      WITH npower
  83.             REPLACE mode       WITH nmode
  84.             REPLACE rx         WITH nrx
  85.             REPLACE tx         WITH ntx
  86.             REPLACE comments   WITH ncomments
  87.             STORE call         TO   lastcall
  88.             STORE "          " TO   ncall
  89.             STORE "          " TO   ncomments
  90.  
  91.          CASE logflag = 'B'
  92.             @ 15,12 GET nband
  93.  
  94.       ENDCASE
  95.    ENDDO
  96. ENDDO
  97. ?
  98. ?
  99. STORE ' ' TO df
  100. ACCEPT 'Is this the last entry in the whole log (Y/N) ?  ' TO df
  101. IF df = 'Y'
  102.    ? 'Formatting the log now,'
  103.    ?
  104.    ACCEPT 'Do you want the contacts numbered' TO df
  105.    STORE 1 TO qsocount
  106.    GOTO TOP
  107.    DO WHILE .NOT. EOF
  108.       REPLACE rx WITH $(comments,1,3)
  109.       REPLACE comments WITH $(comments,4,10)
  110.       IF df = 'Y'
  111.       STORE STR(qsocount,10) TO number
  112.          DO WHILE $(number,1,1) = ' '
  113.              STORE $(number,2,10) TO number
  114.          ENDDO
  115.          REPLACE comments WITH TRIM(number)+'-'+comments
  116.          STORE qsocount + 1 TO qsocount
  117.       ENDIF
  118.       DISP
  119.       SKIP
  120.    ENDDO
  121.    ?
  122.    ? 'Indexing logbook, please standby'
  123.    SET TALK ON
  124.    INDEX ON call+band TO &logbook
  125.    SET TALK OFF
  126. ENDIF
  127. * GET READY TO EXIT
  128. RELEASE df,callflag,lastcall,ndate,ntime,nband,npower
  129. RELEASE nmode,nrx,ntx,nqslsent,nqslrx,ncall,ncomments
  130. RELEASE logflag,dataflag,qsocount,number
  131. USE
  132. RETURN
  133.